<?php
class alphabet_message extends db_table {
	/**
	 * Alphabet message connection id
	 *
	 * @var db_field
	 */
	public $alphabet_message_id;
	/**
	 * Position id
	 *
	 * @var db_field
	 */
	public $position;
	/**
	 * Message id
	 *
	 * @var db_field
	 */
	public $message_id;
	/**
	 * Alphabet id
	 *
	 * @var db_field
	 */
	public $alphabet_id;
	/**
	 * Deleted
	 *
	 * @var db_field
	 */
	public $deleted;
		
	/**
	 * Constructor
	 *
	 * @param mixed $id
	 */
	public function __construct($id = null) {
		parent::__construct($id);
	}
	
	public function get_unique_criteria()
	{
		$criteria = new query_criteria();
		$criteria->add_criterion($this->message_id->get_field_name(), criterion_type::$equal,$this->message_id->get_value());
		$criteria->add_criterion($this->alphabet_id->get_field_name(), criterion_type::$equal,$this->alphabet_id->get_value());
		
		return 	$criteria;	
	}
}
?>